package fhp.hlhj.giantfold.module

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.interfaces.BaseModuleInterface
import fhp.hlhj.giantfold.javaBean.MessageCenterBean
import fhp.hlhj.giantfold.network.UrlApis

/**
 * Created by Administrator on 2018\2\8 0008.
 */
class MessageCenterModule {
    interface OnMessageCenterResp:BaseModuleInterface<MessageCenterBean>


    fun getMessage(params: HttpParams,listener:OnMessageCenterResp){
        UrlApis.getMessageCenter(params)
                .doOnSubscribe {
                    listener.showLoading()
                }
                .subscribe {
                    data->
                    listener.onResp(data)
                }
    }
}